import { MvScene } from '../../mv-scene/entities/mv-scene.entity';
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, OneToMany } from 'typeorm';


@Entity('songs')
export class SongMV {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  // @Column({ type: 'text' })
  // lyrics: string;
  @Column('simple-array')
  lyrics: string[];

  @Column({ nullable: true })  // 允许为空
  mp3: string;

  @Column({ type: 'text' })
  description: string;

  @OneToMany(() => MvScene, scene => scene.song)
  scenes: MvScene[];

  @CreateDateColumn({ name: 'created_at' })
  createdAt: Date;

  @UpdateDateColumn({ name: 'updated_at' })
  updatedAt: Date;
}